
Partial Class Admin_ConnStringCheck
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim oleConn As System.Data.OleDb.OleDbConnection
        Dim lOpen As Boolean

        oleConn = New System.Data.OleDb.OleDbConnection(Session.Item("TstConneString"))
        Try
            oleConn.Open()
            lOpen = True
            oleConn.Close()
            LBL_exception.Text = "N/D"
            LBL_exception.ForeColor = Drawing.Color.Black
        Catch ex As Exception
            lOpen = False
            LBL_exception.Text = ex.Message
            LBL_exception.ForeColor = Drawing.Color.Red
        End Try
        If lOpen Then
            LBL_esito_controllo.Text = "Positivo"
            LBL_exception.ForeColor = Drawing.Color.Green
        Else
            LBL_esito_controllo.Text = "In errore"
            LBL_exception.ForeColor = Drawing.Color.Red
        End If

    End Sub
End Class
